/**
 * 重组树结构
 * @param resq 
 * @returns 
 */
export function getTree(resq: any[]) {
  let treeData = ref<any[]>([])
  resq.forEach((ele: any) => {
    let childTree: any = []
    if (ele.children.length > 0) {
      ele.children.forEach((item: any) => {
        childTree.push({ id: item.id, label: `${item.layer}楼(${item.no})`, icons: 'floor' })
      });
      treeData.value.push({ id: ele.id, label: ele.zone, icons: 'slack', children: childTree })
    } else {
      treeData.value.push({ id: ele.id, label: ele.zone, icons: 'slack' })
    }
  });

  return treeData.value
}